Optimal. Leaf size=215 \[ -\frac{4 a \left (a^2-b^2\right ) \sqrt{\frac{a+b \sin (c+d x)}{a+b}} F\left (\frac{1}{2} \left (c+d x-\frac{\pi }{2}\right )|\frac{2 b}{a+b}\right )}{15 b^2 d \sqrt{a+b \sin (c+d x)}}+\frac{4 \left (a^2+3 b^2\right ) \sqrt{a+b \sin (c+d x)} E\left (\frac{1}{2} \left (c+d x-\frac{\pi }{2}\right )|\frac{2 b}{a+b}\right )}{15 b^2 d \sqrt{\frac{a+b \sin (c+d x)}{a+b}}}+\frac{2 \cos (c+d x) (a+b \sin (c+d x))^{3/2}}{5 b d}-\frac{4 a \cos (c+d x) \sqrt{a+b \sin (c+d x)}}{15 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.260553, antiderivative size = 215, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.304, Rules used = {2695, 2753, 2752, 2663, 2661, 2655, 2653} \[ -\frac{4 a \left (a^2-b^2\right ) \sqrt{\frac{a+b \sin (c+d x)}{a+b}} F\left (\frac{1}{2} \left (c+d x-\frac{\pi }{2}\right )|\frac{2 b}{a+b}\right )}{15 b^2 d \sqrt{a+b \sin (c+d x)}}+\frac{4 \left (a^2+3 b^2\right ) \sqrt{a+b \sin (c+d x)} E\left (\frac{1}{2} \left (c+d x-\frac{\pi }{2}\right )|\frac{2 b}{a+b}\right )}{15 b^2 d \sqrt{\frac{a+b \sin (c+d x)}{a+b}}}+\frac{2 \cos (c+d x) (a+b \sin (c+d x))^{3/2}}{5 b d}-\frac{4 a \cos (c+d x) \sqrt{a+b \sin (c+d x)}}{15 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2695
Rule 2753
Rule 2752
Rule 2663
Rule 2661
Rule 2655
Rule 2653
Rubi steps
\begin{align*} \int \cos ^2(c+d x) \sqrt{a+b \sin (c+d x)} \, dx &=\frac{2 \cos (c+d x) (a+b \sin (c+d x))^{3/2}}{5 b d}+\frac{2 \int (b+a \sin (c+d x)) \sqrt{a+b \sin (c+d x)} \, dx}{5 b}\\ &=-\frac{4 a \cos (c+d x) \sqrt{a+b \sin (c+d x)}}{15 b d}+\frac{2 \cos (c+d x) (a+b \sin (c+d x))^{3/2}}{5 b d}+\frac{4 \int \frac{2 a b+\frac{1}{2} \left (a^2+3 b^2\right ) \sin (c+d x)}{\sqrt{a+b \sin (c+d x)}} \, dx}{15 b}\\ &=-\frac{4 a \cos (c+d x) \sqrt{a+b \sin (c+d x)}}{15 b d}+\frac{2 \cos (c+d x) (a+b \sin (c+d x))^{3/2}}{5 b d}-\frac{\left (2 a \left (a^2-b^2\right )\right ) \int \frac{1}{\sqrt{a+b \sin (c+d x)}} \, dx}{15 b^2}+\frac{\left (2 \left (a^2+3 b^2\right )\right ) \int \sqrt{a+b \sin (c+d x)} \, dx}{15 b^2}\\ &=-\frac{4 a \cos (c+d x) \sqrt{a+b \sin (c+d x)}}{15 b d}+\frac{2 \cos (c+d x) (a+b \sin (c+d x))^{3/2}}{5 b d}+\frac{\left (2 \left (a^2+3 b^2\right ) \sqrt{a+b \sin (c+d x)}\right ) \int \sqrt{\frac{a}{a+b}+\frac{b \sin (c+d x)}{a+b}} \, dx}{15 b^2 \sqrt{\frac{a+b \sin (c+d x)}{a+b}}}-\frac{\left (2 a \left (a^2-b^2\right ) \sqrt{\frac{a+b \sin (c+d x)}{a+b}}\right ) \int \frac{1}{\sqrt{\frac{a}{a+b}+\frac{b \sin (c+d x)}{a+b}}} \, dx}{15 b^2 \sqrt{a+b \sin (c+d x)}}\\ &=-\frac{4 a \cos (c+d x) \sqrt{a+b \sin (c+d x)}}{15 b d}+\frac{2 \cos (c+d x) (a+b \sin (c+d x))^{3/2}}{5 b d}+\frac{4 \left (a^2+3 b^2\right ) E\left (\frac{1}{2} \left (c-\frac{\pi }{2}+d x\right )|\frac{2 b}{a+b}\right ) \sqrt{a+b \sin (c+d x)}}{15 b^2 d \sqrt{\frac{a+b \sin (c+d x)}{a+b}}}-\frac{4 a \left (a^2-b^2\right ) F\left (\frac{1}{2} \left (c-\frac{\pi }{2}+d x\right )|\frac{2 b}{a+b}\right ) \sqrt{\frac{a+b \sin (c+d x)}{a+b}}}{15 b^2 d \sqrt{a+b \sin (c+d x)}}\\ \end{align*}
Mathematica [A] time = 0.798058, size = 185, normalized size = 0.86 \[ \frac{b \cos (c+d x) \left (2 a^2+8 a b \sin (c+d x)-3 b^2 \cos (2 (c+d x))+3 b^2\right )+4 a \left (a^2-b^2\right ) \sqrt{\frac{a+b \sin (c+d x)}{a+b}} F\left (\frac{1}{4} (-2 c-2 d x+\pi )|\frac{2 b}{a+b}\right )-4 \left (a^2 b+a^3+3 a b^2+3 b^3\right ) \sqrt{\frac{a+b \sin (c+d x)}{a+b}} E\left (\frac{1}{4} (-2 c-2 d x+\pi )|\frac{2 b}{a+b}\right )}{15 b^2 d \sqrt{a+b \sin (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.389, size = 792, normalized size = 3.7 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{b \sin \left (d x + c\right ) + a} \cos \left (d x + c\right )^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\sqrt{b \sin \left (d x + c\right ) + a} \cos \left (d x + c\right )^{2}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a + b \sin{\left (c + d x \right )}} \cos ^{2}{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{b \sin \left (d x + c\right ) + a} \cos \left (d x + c\right )^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]